﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace HenuAlbum.Utils
{
    public static partial class Tools
    {
        public static void ResolveLimitAndPage(ref int limit, ref int page, int defaultLimit = 20 ,int maxLimit = 100)
        {
            if (limit <= 0 || limit > maxLimit)
            {
                limit = defaultLimit;
            }
            if (page <= 0)
            {
                page = 1;
            }
        }
    }
}
